namespace ApiStudio.API.Default
{
    //using Microsoft.Extensions.Logging;

    public partial class HttpRequestAction1Instance1
    {
        private readonly ILogger _logger;
        private HttpContext _httpContext;

        public HttpRequestAction1Instance1(ILoggerFactory loggerFactory)
        {
            _logger = loggerFactory.CreateLogger<HttpRequestAction1Instance1>();
        }

        public IResult RunAsync()
        {
            var headerCount = _httpContext.Request.Headers.Count;
            return Results.Ok($"Request header count: {headerCount}");
        }
    }
}